﻿/**
* ...
* @author alijayameilio
*/

package particling.emitter;

import particling.Particle;
import particling.AParticle;

class BoxParticleEmitter extends ParticleEmitter
{

	public var width:Int;
	
	public var height:Int;
	
	private var _width:Int;
	
	private var _height:Int;
	
	public function new(__particle:Particle) :Void
	{
		super(__particle);
		width = 0;
		height = 0;
	}
	
	
	public override function calculateXYPos(__selectedParticle:AParticle):Void
	{
		var xPosition:Float = x + Std.random(width) - width / 2;
		var yPosition:Float = y + Std.random(height) - height / 2;
		__selectedParticle.container.x = xPosition;
		__selectedParticle.container.y = yPosition;
	}
}